var CryptoJS = require("crypto-js");
var key = "b171f5725d050fff";
var iv = "3aae490912d93045";
function cyolEncrypt(data) {
    var key1 = CryptoJS.enc.Latin1.parse(key);
    var iv1 = CryptoJS.enc.Latin1.parse(iv);
    var encrypted = CryptoJS.AES.encrypt(data, key1, {
        iv: iv1,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.ZeroPadding
    }).toString();
    encrypted = encodeURIComponent(encrypted);
    return encrypted
}
function cyolDecrypt(data) {
    var key1 = CryptoJS.enc.Latin1.parse(key);
    var iv1 = CryptoJS.enc.Latin1.parse(iv);
    var decrypted = CryptoJS.AES.decrypt(data, key1, {
        iv: iv1,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.ZeroPadding
    });
    return decrypted.toString(CryptoJS.enc.Utf8)
}
// var res=cyolEncrypt('{"user_id":"e9e06931ac2f4ef02e99e07c2949ff3a","season":4,"number":2,"type":1,"source":1}')
//
// console.log(res)